package com.xintonghua.bussiness.api;

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xintonghua.base.bean.DataList;
import com.xintonghua.bussiness.api.manager.AuthManager;
import com.xintonghua.bussiness.api.myinterface.DataCallBack;
import com.xintonghua.bussiness.api.net.HandleResponseService;
import com.xintonghua.bussiness.api.net.HttpResponseHandler;
import com.xintonghua.bussiness.bean.Auth;
import com.xintonghua.bussiness.request.ShopOrderListRequest;
import com.xintonghua.bussiness.util.MyState;
import com.xintonghua.bussiness.util.MyUtils;

import org.xutils.http.RequestParams;

import java.util.HashMap;

import static com.xintonghua.bussiness.api.BaseApi.getOuterAbsoluteUrl;

public class HttpCent {
    private static HttpCent httpCent;
    private static Context context;
    private static Auth auth;

    public static HttpCent getInstance(Context context) {
        HttpCent.context = context;
        if (httpCent == null) {
            httpCent = new HttpCent();
        }
        return httpCent;
    }

    public static void getAuth() {
        auth = AuthManager.geteAuth(context);
    }

    /**
     * 登录
     *
     * @param userName
     * @param password
     * @param callBack
     * @param order
     */
    public void login(String userName, String password, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("business/user/login"));
        params.addParameter("userName", userName);
        params.addParameter("password", password);
        HandleResponseService.init(context).post(params, callBack, order, "登录:business/user/login");
    }

    /**
     * 商家APP获取当前登录用户信息
     *
     * @param userId
     * @param callBack
     * @param order
     */
    public void userInfo(int userId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("userMe"));
        params.addParameter("userId", userId);
        HandleResponseService.init(context).post(params, callBack, order, "商家APP获取当前登录用户信息:userMe");
    }

    /**
     * 获取客户资料
     *
     * @param callBack
     * @param order
     */
    public void getCustomsInfo(String userId, String shopId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/memberDetailInfo"));
        params.addParameter("userId", userId);
        params.addParameter("shopId", shopId);
        HandleResponseService.init(context).post(params, callBack, order, "商家APP获取商家用户信息:userMe");

    }


    /**
     * 商家端查看店铺订单列表
     *
     * @param request
     * @param callBack
     * @param order
     */
    public void shopOrderList(String dataTime, ShopOrderListRequest request, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/serviceOrders"));
        params.addParameter("userId", request.getUserId());
        params.addParameter("pageNumber", request.getPageNumber());
        params.addParameter("pageSize", request.getPageSize());
        params.addParameter("status", request.getStatus());
        if (!TextUtils.isEmpty(dataTime)) {
            params.addParameter("dateTime", dataTime);
        }
        HandleResponseService.init(context, false).post(params, callBack, order, "商家端查看店铺订单列表:shop/service/serviceOrders");
    }

    /**
     * 商家端查看店铺订单详情
     *
     * @param userId
     * @param orderId
     * @param callBack
     * @param order
     */
    public void shopOrderMsg(int userId, int orderId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/serviceOrderInfo"));
        Log.i("aaa", "shopOrderMsg====>" + orderId + "///userId" + userId);
        params.addParameter("userId", userId);
        params.addParameter("serviceOrderId", orderId);
        HandleResponseService.init(context).post(params, callBack, order, "商家端查看店铺订单详情:shop/service/serviceOrderInfo");
    }

    /**
     * 获取店铺服务项目类型列表
     *
     * @param shopId
     * @param callBack
     * @param order
     */
    public void shopProjectType(int shopId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopProject/projectLists"));
        params.addParameter("shopId", shopId);
        HandleResponseService.init(context).post(params, callBack, order, "获取店铺服务项目类型列表:shop/shopProject/projectLists");
    }

    /**
     * 获取店铺服务项目列表
     *
     * @param projectId
     * @param callBack
     * @param order
     */
    public void shopProjectList(int projectId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopProject/projectItems"));
        params.addParameter("projectId", projectId);
        HandleResponseService.init(context).post(params, callBack, order, "获取店铺服务项目列表shop/shopProject/projectItems");
    }

    /**
     * 获取店铺服务人员列表
     *
     * @param shopId
     * @param callBack
     * @param order
     */
    public void shopServicePerson(int shopId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopProject/servicePersonal"));
        params.addParameter("shopId", shopId);
        HandleResponseService.init(context).post(params, callBack, order, "获取店铺服务人员列表:shop/shopProject/servicePersonal");
    }

    /**
     * 获取商家产品类型列表
     *
     * @param userId
     * @param callBack
     * @param order
     */
    public void shopProductType(int userId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockProduct/productTypes"));
        params.addParameter("userId", userId);
        HandleResponseService.init(context).post(params, callBack, order, "获取商家产品类型列表:shop/stockProduct/productTypes");
    }

    /**
     * 根据产品类型获取产品
     *
     * @param productTypeId
     * @param callBack
     * @param order
     */
    public void shopProductList(int productTypeId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockProduct/productByType"));
        params.addParameter("productTypeId", productTypeId);
        HandleResponseService.init(context).post(params, callBack, order, "根据产品类型获取产品:shop/stockProduct/productByType");
    }

    /**
     * 商家端添加日志
     *
     * @param callBack
     * @param order
     */
    public void shopAddLog(HashMap<String, String> map, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/saveServiceOrderInfo"));
        params.addParameter("userId", map.get("userid"));
        params.addParameter("shopServiceOrderId", map.get("shopServiceOrderId"));
        params.addParameter("shopServiceItems", map.get("shopServiceItems"));
        params.addParameter("nursingSituation", map.get("nursingSituation"));

        params.addParameter("proposal", map.get("proposal"));
        params.addParameter("told", map.get("told"));
        params.addParameter("nextNursingTime", map.get("nextNursingTime"));
        params.addParameter("origWeight", map.get("origWeight"));

        params.addParameter("abdomen", map.get("abdomen"));
        params.addParameter("arm", map.get("arm"));
        params.addParameter("thigh", map.get("thigh"));
        params.addParameter("operationMode", map.get("operationMode"));
        params.addParameter("weightLoss", map.get("weightLoss"));
        params.addParameter("weightLossCatty", map.get("weightLossCatty"));
        params.addParameter("nowWeight", map.get("nowWeight"));
        params.addParameter("nowAbdomen", map.get("nowAbdomen"));
        params.addParameter("nowArm", map.get("nowArm"));
        params.addParameter("nowThigh", map.get("nowThigh"));

        HandleResponseService.init(context).post(params, callBack, order, "商家端添加日志:shop/service/saveServiceOrderInfo");
    }

    /**
     * 23.获取用户账户余额
     *
     * @param userId         要查看的用户编号
     * @param opUserId       操作用户编号
     *                       获取用户账户余额
     * @param userId         要查看的用户编号
     * @param opUserId       操作用户编号
     * @param serviceOrderId 当前订单号
     * @param callBack
     * @param order
     */
    public void getUserAmount(String userId, String opUserId, String serviceOrderId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/userAmount"));
        params.addParameter("userId", userId);
        params.addParameter("opUserId", opUserId);
        params.addParameter("serviceOrderId", serviceOrderId);
        HandleResponseService.init(context).post(params, callBack, order, "获取用户账户余额:shop/service/userAmount");
    }

    /**
     * 23.提交服务订单账单
     * serviceOrderId	int	y	服务单编号
     * operateUserId	Int	y	操作用户
     * customerSign	String	y	客户签字图片
     * shopOwnerSign	String	y	店长签字图片
     * amountMoney	dec	y	实付金额
     *
     * @param callBack
     * @param order
     */
    public void submitServiceOrderBill(String serviceOrderId, String operateUserId, String customerSign, String shopOwnerSign, String amountMoney, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/submitServiceOrderBill"));
        params.addParameter("serviceOrderId", serviceOrderId);
        params.addParameter("operateUserId", operateUserId);
        params.addParameter("customerSign", customerSign);
        params.addParameter("shopOwnerSign", shopOwnerSign);
        params.addParameter("amountMoney", amountMoney);
        HandleResponseService.init(context, false).post(params, callBack, order, "提交服务订单账单:shop/service/submitServiceOrderBill");
    }

    /*
     * 我的分享
     *
     * @param callBack
     * @param order
     */
    public void mySharedList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/myShared/mySharedList"));
        params.addParameter("id", AuthManager.geteAuth().getId());
        params.addParameter("type", 1);
        HandleResponseService.init(context).post(params, callBack, order, "我的分享:shop/myShared/mySharedList");
    }

    /**
     * 我的打赏
     *
     * @param callBack
     * @param order
     */
    public void reward(int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/reward"));
        params.addParameter("id", AuthManager.geteAuth().getId());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", MyState.SIZE);
        HandleResponseService.init(context).post(params, callBack, order, "我的打赏:shop/reward");
    }

    /**
     * 商家APP查看店铺成长日志
     *
     * @param pageNumber
     * @param callBack
     * @param order
     */
    public void growthLog(int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/growthLog"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", MyState.SIZE);
        HandleResponseService.init(context).post(params, callBack, order, "商家APP查看店铺成长日志:shop/shopOwner/growthLog");
    }

    /**
     * 商家APP发布成长日志
     *
     * @param content
     * @param imgs
     * @param callBack
     * @param order
     */
    public void saveGrowthLog(String content, String imgs, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/saveGrowthLog"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("content", content);
        params.addParameter("imgs", imgs);
        HandleResponseService.init(context).post(params, callBack, order, "商家APP发布成长日志:shop/shopOwner/saveGrowthLog");
    }

    /**
     * 我的客户列表
     *
     * @param name     name、搜索客户时输入的客户名字
     * @param callBack
     * @param order
     */
    public void getMyUserList(String name, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getList"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("name", name);
        HandleResponseService.init(context).post(params, callBack, order, "我的客户列表:shop/user/getList");
    }

    /**
     * 会员生日列表
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getMemberBirthdayList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getBirthdayList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("userId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "会员生日列表:shop/user/getBirthdayList");
    }


    /**
     * 预警客户列表
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getWarringMemberList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getDangerList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("userId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "预警客户列表:shop/user/getDangerList");
    }


    /**
     * 客户类别列表（已使用）
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getUserTypeList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getUserTypeList"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "客户类别列表:shop/user/getUserTypeList");
    }

    /**
     * 回访客户列表
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getRevisitList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisit"));
        params.addParameter("id", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "回访客户列表:shop/revisit");
    }

    /**
     * 保存回访信息模板
     *
     * @param typeId   对应类型id
     * @param note     模板内容
     * @param callBack
     * @param order
     */
    public void saveRevisitNote(String typeId, String note, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisit"));
        params.addParameter("shapUserId", AuthManager.geteAuth().getId());
        params.addParameter("typeId", typeId);
        params.addParameter("note", note);
        HandleResponseService.init(context).post(params, callBack, order, "回访客户列表:shop/revisit");
    }

    /**
     * 回访客户类型列表
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getRevisitTypeList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisitType"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context).post(params, callBack, order, "回访客户类型列表:shop/revisitType");
    }

    /**
     * 某一类别的具体信息列表
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void getRevisitNoteList(String typeId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisitNote/list"));
        params.addParameter("typeId", typeId);
        HandleResponseService.init(context).post(params, callBack, order, "回访客户类型列表:shop/revisitNote/list");
    }

    /**
     * 删除某一模板信息
     *
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void deleteModeContent(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisitNote/delete"));
        params.addParameter("id", id);
        HandleResponseService.init(context).post(params, callBack, order, "删除某一模板信息:shop/revisitNote/delete");
    }

    /**
     * 我的客户列表点击客户显示的客户详情页面
     *
     * @param id            客户id
     * @param 、搜索客户时输入的客户名字 shopId(商铺id)、userId(店员id)
     * @param callBack
     * @param order
     */
    public void detail(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/detail"));
        params.addParameter("id", id);
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "我的客户列表点击客户显示的客户详情页面:shop/user/detail");
    }

    /**
     * 保存回访信息模板
     * 员工职位列表
     *
     * @param callBack
     * @param order
     */
    public void saveModeTo(String typeId, String note, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisitNote/save"));
        params.addParameter("note", note);
        params.addParameter("typeId", typeId);
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "保存回访信息模板:shop/revisitNote/save");
    }

    /**
     * 保存回访客户的记录
     *
     * @param callBack
     * @param order
     */
    public void sendRevistRecord(String kehuid, String note, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/revisit/save"));
        params.addParameter("note", note);
        params.addParameter("userId", kehuid);
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "保存回访信息模板:shop/revisit/save");
    }

    /**
     * 新增添加客户
     *
     * @param callBack
     * @param order
     */
    public void addUserSave(String phone, String nickname, String sex, String birthday, int id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/save"));
        params.addParameter("phone", phone);
        params.addParameter("nickname", nickname);
        params.addParameter("sex", sex);
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("birthday", birthday);
        params.addParameter("resourceId", id);
        HandleResponseService.init(context).post(params, callBack, order, "新增添加客户:shop/user/save");
    }

    /**
     * 查看用户的会员卡信息
     *
     * @param callBack
     * @param order
     */
    public void getCustomerMemberCard(String userId, String pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/customerMemberCard"));
        params.addParameter("userId", userId);
        params.addParameter("pageSize", MyState.SIZE);
        params.addParameter("pageNumber", pageNumber);
        HandleResponseService.init(context).post(params, callBack, order, "查看用户的会员卡信息:shop/customer/customerMemberCard");
    }

    public void staffTypes(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/staffTypes"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * 商家APP员工管理列表
     *
     * @param positionId
     * @param callBack
     * @param order
     */
    public void staffManager(int positionId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/staffManager"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("show", 1);
        params.addParameter("positionId", positionId);
        HandleResponseService.init(context, false).post(params, callBack, order, "商家APP员工管理列表shop/shopOwner/staffManager");
    }

    /**
     * 获取商品管理列表
     *
     * @param pageNumber
     * @param productName
     * @param sort
     * @param callBack
     * @param order
     */
    public void stockProducts(int pageNumber, String productName, int sort, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockProduct/stockProducts"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("pageSize", MyState.SIZE);
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("productName", productName);
        params.addParameter("sort", sort);
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * 添加员工
     */
    public void addStaff(String portrait, String fullName, int sex, int positionId, String phone, String password, String note, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/addStaff"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("portrait", portrait);
        params.addParameter("fullName", fullName);
        params.addParameter("sex", sex);
        params.addParameter("positionId", positionId);
        params.addParameter("phone", phone);
        params.addParameter("password", password);
        params.addParameter("note", note);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 商品管理入库
     *
     * @param callBack
     * @param order
     */
    public void saveStockProduct(int productId, int amount, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/addStaff"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("productId", productId);
        params.addParameter("amount", amount);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 评价管理
     *
     * @param pageNumber
     * @param pageSize
     * @param callBack
     * @param order
     */
    public void shopEvaluates(int pageNumber, int pageSize, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/shopEvaluates"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", pageSize);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 店铺信息
     *
     * @param callBack
     * @param order
     */
    public void shopInfo(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/shopInfo"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 获取商品管理列表
     * <p>
     * 查看用户的会员卡信息
     *
     * @param userId   要查看的会员编号
     * @param callBack
     * @param order
     */
    public void getUserMemberCard(String userId, String pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/customerMemberCard"));
        params.addParameter("userId", userId);
        params.addParameter("opUserId", AuthManager.geteAuth().getId());
        params.addParameter("pageSize", MyState.SIZE);
        params.addParameter("pageNumber", pageNumber);
        HandleResponseService.init(context).post(params, callBack, order, "查看用户的会员卡信息:shop/customer/customerMemberCard");
    }

    /**
     * 会员卡充值页面信息
     *
     * @param customberId      客户编号
     * @param memberCardTypeId 充值会员卡类型
     * @param callBack
     * @param order
     */
    public void getMemberRechargeTypes(String customberId, String memberCardTypeId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/memberCardRechargeTypes"));
        params.addParameter("customberId", customberId);
        params.addParameter("memberCardTypeId", memberCardTypeId);
        params.addParameter("opUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "查看用户的会员卡信息:shop/customer/customerMemberCard");
    }

    /**
     * 会员卡充值
     *
     * @param userId
     * @param memberCardId
     * @param rechargeType
     * @param memberCardType
     * @param callBack
     * @param order
     */
    public void RechangeMemberCard(String userId, String memberCardId, String rechargeType, String memberCardType, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/memberCardRecharge"));
        params.addParameter("userId", userId);
        params.addParameter("memberCardTypeId", memberCardId);
        params.addParameter("rechargeType", rechargeType);
        params.addParameter("memberCardType", memberCardType);

        params.addParameter("opUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context).post(params, callBack, order, "会员卡充值:shop/customer/memberCardRecharge");
    }

    /**
     * 获取出勤记录页面的详细数据
     *
     * @param time     查询时间（今天的就是当前时间，以前的就传当天+23:59:59）
     * @param callBack
     * @param order
     */
    public void getRecord(int shopId, String time, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/check/getRecord"));
        params.addParameter("shopId", shopId);
        params.addParameter("time", time);
        HandleResponseService.init(context, false).post(params, callBack, order, "获取出勤记录:shop/check/getRecord");
    }

    /**
     * @param ids      不同类型人员的id字符串，逗号隔开，在/shop/check/getRecord 接口返回的参数中获取
     * @param type     表示人员类型，这个接口返回的msg的值就是传入的这个参数的值
     * @param callBack
     * @param order
     */
    public void getRecordListByIds(String ids, String type, String time, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/check/getList"));
        params.addParameter("ids", ids);
        params.addParameter("type", type);
        params.addParameter("time", time);
        HandleResponseService.init(context).post(params, callBack, order, "获取出勤记录:shop/check/getRecord");
    }

    /**
     * 获取我的客户购买的商品
     *
     * @param consumerId 客户编号
     * @param callBack
     * @param order
     */
    public void getMemberProducts(String page, String consumerId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/memberProducts"));
        params.addParameter("opUserId", AuthManager.geteAuth().getId());
        params.addParameter("consumerId", consumerId);
        params.addParameter("pageSize", MyState.SIZE);
        params.addParameter("pageNumber", page);
        HandleResponseService.init(context).post(params, callBack, order, "获取我的客户购买的商品:shop/customer/memberProducts");
    }


//    /shop/check/getList    获取出勤记录不同数据的详细人员列表  param:ids()、type(表示人员类型，这个接口返回的msg的值就是传入的这个参数的值)

    /**
     * 店铺信息
     *
     * @param callBack
     * @param order
     */
    public void saveShopInfo(String shopName, String address, String phone, String startTime, String endTime, String imgs, String shopimg, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/saveShopInfo"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("shopName", shopName);
        params.addParameter("address", address);
        params.addParameter("phone", phone);
        params.addParameter("startTime", startTime);
        params.addParameter("endTime", endTime);
        params.addParameter("imgs", imgs);
        params.addParameter("shopimg", shopimg);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 进货商城订单订单列表
     *
     * @param callBack
     * @param order
     */
    public void shopList(int status, int pageNumber, int pageSize, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockOrder/myList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("status", status);
        params.addParameter("pageSize", pageSize);
        params.addParameter("pageNumber", pageNumber);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    public void getThisMonth(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockOrder/getThisMonth"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 进货商城订单确认收到货物
     * /shop/stockOrder/sureGet
     *
     * @param id
     * @param callBack
     * @param order
     */
    public void sureGet(int id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockOrder/sureGet"));
        params.addParameter("id", id);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 历史记录
     *
     * @param pageNumber
     * @param pageSize
     * @param consumptionTime
     * @param callBack
     * @param order
     */
    public void recordsConsumption(int pageNumber, int pageSize, String consumptionTime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/recordsConsumption"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("pageSize", pageSize);
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("consumptionTime", consumptionTime);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * shop/stockType
     * 进货商城商品类别列表
     */
    public void stockType(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockType"));
        // params.addParameter("id", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * shop/stockType
     * 进货商城某一类别对应的商品列表
     */
    public void stockGoods(int id, boolean zh, boolean xl, boolean jg, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockGoods"));
        params.addParameter("id", id);
        if (zh) {
            params.addParameter("ZH", zh);
        }
        if (xl) {
            params.addParameter("XL", xl);
        }
        params.addParameter("JG", jg);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * shop/stockType
     * 进货商城商品类别列表
     */
    public void addCart(int goodsId, int count, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockCar/save"));
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        params.addParameter("goodsId", goodsId);
        params.addParameter("count", count);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 购物车商品列表
     * 不需要分页
     */
    public void shopList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockCar/myList"));
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        params.addParameter("pageSize", 100);
        params.addParameter("pageNumber", 1);
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * 删除购物车的商品
     *
     * @param carId
     * @param callBack
     * @param order
     */
    public void delShopping(int carId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockCar/delete"));
        params.addParameter("carId", carId);
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * 购物车商品数量修改
     *
     * @param carId
     * @param callBack
     * @param order
     */
    public void updateCar(int carId, int count, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockCar/update"));
        params.addParameter("carId", carId);
        params.addParameter("count", count);
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * 保存订单
     *
     * @param json
     * @param total
     * @param callBack
     * @param order
     */
    public void saveOrder(String json, double total, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockOrder/saveOrder"));
        params.addParameter("id", AuthManager.geteAuth().getShop_id());
        params.addParameter("jsonStr", json);
        params.addParameter("total", total);
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * 客户购买商品
     *
     * @param callBack
     * @param order
     */
    public void buyShopProduct(String consumerId, String shopStockProductId, String purchaseQuantity, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/purchaseProduct"));
        params.addParameter("opUserId", AuthManager.geteAuth().getShop_id());
        params.addParameter("consumerId", consumerId);
        params.addParameter("shopStockProductId", shopStockProductId);
        params.addParameter("purchaseQuantity", purchaseQuantity);
        HandleResponseService.init(context, false).post(params, callBack, order, "客户购买商品shop/customer/purchaseProduct");

    }
//    /shop/user/save     新增添加客户  param:phone(手机号)、nickname(客户名字)、sex(性别：1男 0女)、userId(创建人id)

    /**
     * .消费记录
     *
     * @param callBack
     * @param order
     */
    public void getRecordConsumeList(String userId, String pageNumber, String pageSize, String consumptionTime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/recordsConsumption"));
        params.addParameter("userId", userId);
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", pageSize);
        params.addParameter("consumptionTime", consumptionTime);
        HandleResponseService.init(context, false).post(params, callBack, order, "消费记录shop/customer/recordsConsumption");

    }

    /**
     * .取消订单
     *
     * @param callBack
     * @param order
     */
    public void cancelOrder(String serviceOrderId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/cancelOrder"));
        params.addParameter("serviceOrderId", serviceOrderId);
        params.addParameter("opUserId", AuthManager.geteAuth().getId());

        HandleResponseService.init(context, false).post(params, callBack, order, "取消订单shop/service/cancelOrder");
    }

//    shop/shopUserTask/getTask

    /**
     * .首页任务数据
     *
     * @param callBack
     * @param order
     */
    public void getHomeData(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/getTask"));
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "首页shop/shopUserTask/getTask");
    }

    /**
     * .TaskActivity专用业绩
     *
     * @param callBack
     * @param order
     */
    public void getTaskDetails(int pageNumber, String shapUserId, String type, String starttime, String endtime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/taskDetail"));
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", 100);
        if (!TextUtils.isEmpty(shapUserId)) {
            params.addParameter("shopUserId", shapUserId);
        } else {
            params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        }


        String types = "";
        switch (type) {
            case "0":
                types = "DAY";
                break;
            case "1":
                types = "WEEK";
                break;
            case "2":
                types = "MONTH";
                break;
            case "3":
                types = "JIDU";
                break;
            case "4":
                types = "CHOOSE";
                if (!TextUtils.isEmpty(starttime))
                    params.addParameter("starttime", starttime);
                else
                    MyUtils.mToast(context, "请选择开始时间！");
                if (!TextUtils.isEmpty(endtime))
                    params.addParameter("endtime", endtime);
                else
                    MyUtils.mToast(context, "请选择结束时间！");
                break;
        }
        params.addParameter("TYPE", types);

        HandleResponseService.init(context, false).post(params, callBack, order, "首页shop/shopUserTask/taskDetail");
    }

    /**
     * .TaskActivity专用业绩
     *
     * @param callBack
     * @param order
     */
    public void getSaleDetails(int pageNumber, String shapUserId, String type, String starttime, String endtime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/saleDetail"));
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", 100);
        if (!TextUtils.isEmpty(shapUserId)) {
            params.addParameter("shopUserId", shapUserId);
        } else {
            params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        }


        String types = "";
        switch (type) {
            case "0":
                types = "DAY";
                break;
            case "1":
                types = "WEEK";
                break;
            case "2":
                types = "MONTH";
                break;
            case "3":
                types = "JIDU";
                break;
            case "4":
                types = "CHOOSE";
                if (!TextUtils.isEmpty(starttime))
                    params.addParameter("starttime", starttime);
                else
                    MyUtils.mToast(context, "请选择开始时间！");
                if (!TextUtils.isEmpty(endtime))
                    params.addParameter("endtime", endtime);
                else
                    MyUtils.mToast(context, "请选择结束时间！");
                break;
        }
        params.addParameter("TYPE", types);

        HandleResponseService.init(context, false).post(params, callBack, order, "首页shop/shopUserTask/taskDetail");
    }

    /***
     * 保存考勤打卡记录
     * @param callBack
     * @param order
     */
    public void saveCheck(String shopUserId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/check/save"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("shopUserId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * 分享
     *
     * @param callBack
     * @param order
     */
    public void getMyShared(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/myShared/getMyShared"));
        params.addParameter("id", AuthManager.geteAuth().getId());
        params.addParameter("type", 1);
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * //获取小程序二维码
     *
     * @param callBack
     * @param order
     */
    public void getRrCode(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/erweima/shareCode"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * "shop/erweima/delete"//删除小程序二维码
     * * @param order
     */
    public void deleteRrCode(String name, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/erweima/delete"));
        params.addParameter("name", name);
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * 保存用户信息
     *
     * @param callBack
     * @param order
     */
    public void saveUserInfo(String img, String name, int sex, int position_id, String qq, String wx, String working_life, String my_speciality, String my_dream, String my_address, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("saveUserInfo"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("img", img);
        params.addParameter("name", name);
        params.addParameter("sex", sex);
        params.addParameter("position_id", position_id);
        params.addParameter("qq", qq);
        params.addParameter("wx", wx);
        params.addParameter("working_life", working_life);
        params.addParameter("my_speciality", my_speciality);
        params.addParameter("my_dream", my_dream);
        params.addParameter("my_address", my_address);
        HandleResponseService.init(context).post(params, callBack, order, "");


    }

    /**
     * 保存客户资料
     *
     * @param Introducer
     * @param constellation
     * @param email
     * @param entryTime
     * @param hairdresser
     * @param head_img
     * @param height
     * @param memberType
     * @param membershipNumber
     * @param nickname
     * @param note
     * @param occupation
     * @param premenstrualCondition
     * @param referee
     * @param sex
     * @param shopId
     * @param source
     * @param storeAddress
     * @param userId
     * @param weight
     * @param wx
     */
    public void saveMemberDetailInfo(String Introducer, String constellation, String email, String entryTime, String hairdresser,
                                     String head_img, String height, String memberType, String membershipNumber, String nickname,
                                     String note, String occupation, String premenstrualCondition, String referee, int sex,
                                     String shopId, String source, String storeAddress, String userId, String weight, String wx, String birthday, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/customer/saveMemberDetailInfo"));
        params.addParameter("Introducer", Introducer);
        params.addParameter("constellation", constellation);
        params.addParameter("email", email);
        params.addParameter("entryTime", entryTime);
        params.addParameter("hairdresser", hairdresser);
        params.addParameter("head_img", head_img);
        params.addParameter("height", height);
        params.addParameter("memberType", memberType);
        params.addParameter("membershipNumber", membershipNumber);
        params.addParameter("nickname", nickname);
        params.addParameter("note", note);
        params.addParameter("occupation", occupation);
        params.addParameter("premenstrualCondition", premenstrualCondition);
        params.addParameter("referee", referee);
        params.addParameter("sex", sex);
        params.addParameter("note", note);
        params.addParameter("shopId", shopId);
        params.addParameter("source", source);
        params.addParameter("storeAddress", storeAddress);
        params.addParameter("userId", userId);
        params.addParameter("weight", weight);
        params.addParameter("wx", wx);
        params.addParameter("birthday", birthday);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 店员提现
     *
     * @param bankName
     * @param bankId
     * @param customerName
     * @param money
     * @param callBack
     * @param order
     */
    public void saveCash(String bankName, String bankId, String customerName, String money, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/reward/saveCash"));
        params.addParameter("id", AuthManager.geteAuth().getId());
        params.addParameter("bankName", bankName);
        params.addParameter("bankId", bankId);
        params.addParameter("customerName", customerName);
        params.addParameter("money", money);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 商学院分类
     */
    public void healthCultureType(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("wx/home/healthCultureType"));
        params.addParameter("shopId", 0);
        HandleResponseService.init(context, false).get(params, callBack, order, "");
    }

    /**
     * 养生文化列表
     */
    public void healthCulture(int page, int type_id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("wx/home/healthCulture"));
        params.addParameter("page", page);
        params.addParameter("size", MyState.SIZE);
        params.addParameter("type_id", type_id);
        HandleResponseService.init(context, false).get(params, callBack, order, "");
    }

    /**
     * 系统消息
     *
     * @param callBack
     * @param order
     */
    public void message(int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("sys/message/messages"));
        params.addParameter("userId", AuthManager.geteAuth().getId());
        params.addParameter("pageSize", MyState.SIZE);
        params.addParameter("pageNumber", pageNumber);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 总任务和已完成
     *
     * @param callBack
     * @param order
     */
    public void getTaskRecord(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/getTaskRecord"));
        params.addParameter("shopUserId", id);
        HandleResponseService.init(context).post(params, callBack, order, "总任务和已完成shop/shopUserTask/getTaskRecord");
    }

    /**
     * 总任务和已完成
     *
     * @param callBack
     * @param order
     */
    public void getTaskPerMonthList(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/getTaskPerMonthList"));
        params.addParameter("shopUserId", id);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 获取当前天之后的三个月
     *
     * @param callBack
     * @param order
     */
    public void getNextThreeMonth(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/getNextThreeMonth"));
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 保存任务设置
     *
     * @param json
     * @param callBack
     * @param order
     */
    public void shopUserTaskSave(String shopUserId, String json, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopUserTask/save"));
        params.addParameter("shopUserId", shopUserId);
        params.addParameter("jsonStr", json);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 3.数据魔方 客户
     *
     * @param callBack
     * @param order
     */
    public void showCustomer(int shopId, String startTime, String endTime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/customer"));
        params.addParameter("shopId", shopId);
        if (!TextUtils.isEmpty(startTime)) {
            params.addParameter("startTime", startTime);
        }
        if (!TextUtils.isEmpty(endTime)) {
            params.addParameter("endTime", endTime);
        }
        HandleResponseService.init(context).post(params, callBack, order, "数据魔方（3.客户）shop/dataStatistics/customer");
    }

    /**
     * 3.数据魔方 (库存)
     *
     * @param callBack
     * @param order
     */
    public void getReserve(int shopId, String startTime, String endTime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/reserve"));
        params.addParameter("shopId", shopId);
        if (!TextUtils.isEmpty(startTime)) {
            params.addParameter("startTime", startTime);
        }
        if (!TextUtils.isEmpty(endTime)) {
            params.addParameter("endTime", endTime);
        }
        HandleResponseService.init(context).post(params, callBack, order, "数据魔方（3.库存）shop/dataStatistics/reserve");
    }

    /**
     * 18确认到店
     *
     * @param order
     */
    public void getReserve(String serviceOrderId, String userId, String signImgUrl, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/service/confirmTheShop"));
        params.addParameter("serviceOrderId", serviceOrderId);
        params.addParameter("userId", userId);
        params.addParameter("signImgUrl", signImgUrl);
        HandleResponseService.init(context).post(params, callBack, order, "确认到店shop/service/confirmTheShop");
    }

    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 0.打赏余额
     *
     * @param order
     */
    public void getMyBalance(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/reward/myBalance"));
        params.addParameter("shopUserId", AuthManager.geteAuth().getShop_id());

        HandleResponseService.init(context, false).post(params, callBack, order, "打赏余额shop/reward/myBalance");
    }

    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 2.数据统计---营业额
     *
     * @param order
     */
    public void getDataStatics(int shopId, DataCallBack callBack, String startTime, String endTime, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/business"));
        params.addParameter("shopId", shopId);
        if (!TextUtils.isEmpty(startTime)) {
            params.addParameter("startTime", startTime);
        }
        if (!TextUtils.isEmpty(endTime)) {
            params.addParameter("endTime", endTime);
        }
        params.addParameter("pageNumber", 1);
        params.addParameter("pageSize", 100);
        HandleResponseService.init(context, false).post(params, callBack, order, "数据统计---营业额shop/dataStatistics/business");
    }

    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 2.数据统计---营业额
     *
     * @param order
     */
    public void getZhichuList(DataCallBack callBack, String startTime, String endTime, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/zhichuList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        if (!TextUtils.isEmpty(startTime)) {
            params.addParameter("startTime", startTime);
        }
        if (!TextUtils.isEmpty(endTime)) {
            params.addParameter("endTime", endTime);
        }
        params.addParameter("pageNumber", 1);
        params.addParameter("pageSize", 100);
        HandleResponseService.init(context, false).post(params, callBack, order, "支出列表shop/dataStatistics/zhichuList");
    }

    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 3.项目列表
     *
     * @param order
     */
    public void getProjectList(DataCallBack callBack, String starttime, String endtime, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/projectList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        if (!TextUtils.isEmpty(starttime)) {
            params.addParameter("startTime", starttime);
        }
        if (!TextUtils.isEmpty(endtime)) {
            params.addParameter("endTime", endtime);
        }
        params.addParameter("pageNumber", 1);
        params.addParameter("pageSize", 100);
        HandleResponseService.init(context, false).post(params, callBack, order, "项目列表shop/dataStatistics/projectList");
    }

    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 4.服务列表
     *
     * @param order
     */
    public void getServiceList(DataCallBack callBack, String starttime, String endtime, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/serviceList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        if (!TextUtils.isEmpty(starttime)) {
            params.addParameter("startTime", starttime);
        }
        if (!TextUtils.isEmpty(endtime)) {
            params.addParameter("endTime", endtime);
        }
        params.addParameter("pageNumber", 1);
        params.addParameter("pageSize", 100);
        HandleResponseService.init(context, false).post(params, callBack, order, "4.服务列表shop/dataStatistics/serviceList");
    }


    /**
     * JY弘毅APP 数据统计之营业额.docx
     * 5.单个项目/服务的详情
     *
     * @param type  0服务 1项目
     * @param order
     */
    public void getTongJiDetail(String id, String type, String starttime, String endtime, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/detail"));
        params.addParameter("id", id);
        if (!TextUtils.isEmpty(starttime))
            params.addParameter("startTime", starttime);
        if (!TextUtils.isEmpty(endtime))
            params.addParameter("endTime", endtime);
        switch (type) {
            case "0":
                params.addParameter("type", "SERVICE");
                break;
            case "1":
                params.addParameter("type", "PROJECT");
                break;
        }
        HandleResponseService.init(context).post(params, callBack, order, "单个项目/服务的详情shop/dataStatistics/detail");
    }


    /**
     * 客户美容测试类型列表
     *
     * @param order
     */
    public void getBeautyType(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/beautyType"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context).post(params, callBack, order, "4.客户美容测试类型列表shop/beautyType");
    }

    /**
     * 保存客户历史得分
     *
     * @param order
     */
    public void saveBeautyHistoryScore(String userId, String testTypeId, String choice, String score, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/beautyTest/save"));
        params.addParameter("userId", userId);
        params.addParameter("typeId", testTypeId);
        params.addParameter("choice", choice);
        params.addParameter("score", score);
        HandleResponseService.init(context).post(params, callBack, order, "保存客户历史得分shop/beautyTest/save");
    }

    /**
     * 客户某种类型测试下的所有测试题目
     * id  测试类型id
     *
     * @param order
     */
    public void getBeautyTitle(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/beautyTitle"));
        params.addParameter("id", id);
        HandleResponseService.init(context).post(params, callBack, order, "客户某种类型测试下的所有测试题目shop/beautyTitle");
    }

    /**
     * 客户美容测试历史得分列表
     * id 客户id
     *
     * @param order
     */
    public void getBeautyTestList(String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/beautyTest"));
        params.addParameter("id", id);
        HandleResponseService.init(context).post(params, callBack, order, "客户美容测试历史得分列表shop/beautyTest");
    }

    /**
     * 员工编辑回显
     *
     * @param shopUserId
     * @param callBack
     * @param order
     */
    public void shopOwnerToEdit(String shopUserId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/toEdit"));
        params.addParameter("shopUserId", shopUserId);
        HandleResponseService.init(context).get(params, callBack, order, "员工编辑回显");
    }

    /**
     * 员工编辑保存
     *
     * @param portrait
     * @param fullName
     * @param sex
     * @param pasitionId
     * @param phone
     * @param note
     * @param id
     * @param callBack
     * @param order
     */
    public void shopOwnerSaveEdit(String portrait, String fullName, int sex, int pasitionId, String phone, String note, String id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/saveEdit"));
        params.addParameter("portrait", portrait);
        params.addParameter("fullName", fullName);
        params.addParameter("sex", sex);
        params.addParameter("pasitionId", pasitionId);
        params.addParameter("phone", phone);
        params.addParameter("note", note);
        params.addParameter("id", id);
        HandleResponseService.init(context).post(params, callBack, order, "员工编辑保存");

    }

    /**
     * 统计用户未读消息条数
     *
     * @param callBack
     * @param order
     */
    public void getMessageCount(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("sys/message/getMessageCount"));
        params.addParameter("type", 1); //商家端type=1，客户端type=2，
        params.addParameter("id", AuthManager.getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "统计用户未读消息条数");
    }

    /**
     * 修改平台发送给商家的消息为已读
     *
     * @param callBack
     * @param order
     */
    public void updatePingtai(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("sys/message/updatePingtai"));
        params.addParameter("userId", AuthManager.getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 商学院详情
     *
     * @param callBack
     * @param order
     */
    public void cultureDetail(int id, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("sys/health/culture/detail"));
        params.addParameter("id", id);
        HandleResponseService.init(context, false).post(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 获取客户来源列表
     *
     * @param callBack
     * @param order
     */
    public void getResouceList(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/shopOwner/getResouceList"));
        HandleResponseService.init(context, false).get(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 我的服务评价列表
     *
     * @param id
     * @param callBack
     * @param order
     */
    public void serviceEvaluteList(int id, int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/toShopUserEvaluate/myList"));
        params.addParameter("shopUserId", id);
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", MyState.SIZE);
        HandleResponseService.init(context).post(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 查询店铺是否到期
     *
     * @param callBack
     * @param order
     */
    public void pastDue(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/toShopUserEvaluate/myList"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context, false).post(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 查看订单编号
     *
     * @param orderId
     * @param callBack
     * @param order
     */
    public void getNumber(int orderId, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/stockOrder/getNumber"));
        params.addParameter("orderId", orderId);
        HandleResponseService.init(context, false).post(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 获取提现手续费
     *
     * @param callBack
     * @param order
     */
    public void getTixianMoney(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getTixianMoney"));
        HandleResponseService.init(context, false).get(params, callBack, order, "统计用户未读消息条数");

    }

    /**
     * 查询店铺是否到期
     */
    public void shopIsUsed(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("business/user/shopIsUsed"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        HandleResponseService.init(context, false).post(params, callBack, order, "");
    }

    /**
     * 店铺列表
     *
     * @param callBack
     * @param order
     */
    public void shopType(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("business/user/shopList"));
        params.addParameter("userId", AuthManager.getId());
        HandleResponseService.init(context, false).post(params, callBack, order, "");

    }

    /**
     * 进货详请
     *
     * @param pageNumber
     * @param callBack
     * @param order
     */
    public void jinhuoDetail(int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/jinhuoDetail"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", MyState.SIZE);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 销量详情
     *
     * @param pageNumber
     * @param callBack
     * @param order
     */
    public void xiaoliangDetail(int pageNumber, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/dataStatistics/xiaoliangDetail"));
        params.addParameter("shopId", AuthManager.geteAuth().getShop_id());
        params.addParameter("pageNumber", pageNumber);
        params.addParameter("pageSize", MyState.SIZE);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * @param content
     * @param callBack
     * @param order
     */
    public void orderCommit(String content, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("wx/server/order/commit"));
        params.setBodyContent(content);
        params.setAsJsonContent(true);
        HandleResponseService.init(context).post(params, callBack, order, "");


    }

    /**
     * 获取用户已有的会员卡
     *
     * @param callBack
     * @param order
     */
    public void getCardList(int uid, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("wx/vip/card/list"));
        params.addParameter("uid", uid);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 检测更新 /shop/user/getDetail
     * 1安卓  2ios
     */
    public void update(DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/getDetail"));
        params.addParameter("type", 1);
        HandleResponseService.init(context).post(params, callBack, order, "");
    }

    /**
     * 测试结果
     *
     * @param typeId
     * @param score
     * @param callBack
     * @param order
     */
    public void beautyType(String typeId, String score, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/beautyType/getShow"));
        params.addParameter("typeId", typeId);
        params.addParameter("score", score);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }

    /**
     * 充值
     */
    public void saveBalance(String userId, String shopId, String money, DataCallBack callBack, int order) {
        RequestParams params = new RequestParams(getOuterAbsoluteUrl("shop/user/saveBalance"));
        params.addParameter("userId", userId);
        params.addParameter("shopId", shopId);
        params.addParameter("money", money);
        HandleResponseService.init(context).post(params, callBack, order, "");

    }


}